﻿using UnityEngine;
using System.Collections;
namespace GameUnit
{
    public class NameBoardUWidget : UWidget
    {
        public GameObject NameBoardG;
        public override void Init(Unit unit)
        {
            
            NameBoardG = (GameObject)Instantiate( Resources.Load("Prefab/UWidget/NameBoard"));
            NameBoardG.transform.parent = transform;
            base.Init(unit);
        }


        public override void OnLoad()
        {
            this.NameBoardG.transform.Find("NameBoard").GetComponent<UILabel>().text = this.Unit.GamePlayer.NickName;
        }
    }
}
